// ProgDlg.h : header file
// CG: This file was added by the Progress Dialog component

/////////////////////////////////////////////////////////////////////////////
// CProgressDlg dialog

#ifndef __PROGDLG_H__
#define __PROGDLG_H__

#include "link.h"
#include "ShadeButtonST.h"


class CProgressDlg : public CDialog
{
// Construction / Destruction
public:
    CProgressDlg(UINT nCaptionID = 0);   // standard constructor
    ~CProgressDlg();

    int Popup(LPCTSTR strInfo = NULL, LPCTSTR strBtnTitle = NULL);

    // Checking for Cancel button
    BOOL CheckCancelButton();
    CFont m_font;
    BOOL m_bCancel;
    CButtonST m_btn;//CShadeButtonST m_btn;
    // Progress Dialog manipulation
    void SetRange(int nLower,int nUpper);
    int  SetStep(int nStep);
    int  SetPos(int nPos);
    int  OffsetPos(int nPos);
    int  StepIt();
    void SetInfo(LPCTSTR strInfo);
    void AddInfo(LPCTSTR strInfo);
        
// Dialog Data
    //{{AFX_DATA(CProgressDlg)
	enum { IDD = CG_IDD_PROGRESS };
	CLink	m_oTxt;
	//}}AFX_DATA

// Overrides
    // ClassWizard generated virtual function overrides
    //{{AFX_VIRTUAL(CProgressDlg)
    public:
    virtual BOOL DestroyWindow();
    protected:
    virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
    //}}AFX_VIRTUAL

// Implementation
protected:
	UINT m_nCaptionID;
    int m_nLower;
    int m_nUpper;
    int m_nStep;
    CBitmap m_backgrd;
	CDC *m_pBkDC;
    
    BOOL m_bParentDisabled;

    void ReEnableParent();

    virtual void OnCancel(){};
    virtual void OnOK() {}; 
    void UpdatePercent(int nCurrent);
    void PumpMessages();

    // Generated message map functions
    //{{AFX_MSG(CProgressDlg)
    virtual BOOL OnInitDialog();
	afx_msg void OnBtnCancel();
	afx_msg void OnPaint();
    afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnDestroy();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	//}}AFX_MSG
    UINT OnNcHitTest(CPoint pt);
    DECLARE_MESSAGE_MAP()
};

#endif // __PROGDLG_H__
